package com.mega.ycy.mixin;

import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.ParticleManager;
import net.minecraft.server.integrated.IntegratedServer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ParticleManager.class)
public class ParticleManagerMixin {
    /**
     * @author updateEffects
     */
    @Inject(method = "func_78868_a", at = @At("HEAD"), cancellable = true)
    public void tick(CallbackInfo ci) {
        if (TWEAKER.isTimeStop) ci.cancel();
    }

    /**
     * @author addEffect
     */
    @Inject(method = "func_78873_a", at = @At("HEAD"), cancellable = true)
    public void addEffect(Particle effect, CallbackInfo ci) {
        if (TWEAKER.isTimeStop) ci.cancel();
    }
}
